<?php
namespace App\WebSocket\Controller;

use App\Storage\OnlineUser;
use EasySwoole\Socket\AbstractInterface\Controller;
use EasySwoole\Socket\Client\WebSocket;

class Base extends Controller {

    protected function currentUser() {
        /** @var WebSocket */
        $client = $this->caller()->getClient();
        return OnlineUser::getInstance()->get($client->getFd());
    }

}